import sqlite3
conn = sqlite3.connect("data/test.db")
c = conn.cursor()
create_sql = 'CREATE TABLE trans(date text, flag text, symbol text, qty real, price real)'
c.execute(create_sql)
insert_sql = "insert into trans values('2025-09-29', 'BUY', '中国银行', 100, 3.19)"
c.execute(insert_sql)
for row in c.execute('SELECT * FROM trans'):
    print(row)
conn.commit()
conn.close()